﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage_Home.master" AutoEventWireup="true" CodeFile="Taotaikhoan_bacsi.aspx.cs" Inherits="Taotaikhoan_bacsi" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="div_chuyenmuc">

            <div class="services_box">
                <div class="service_title">
                <img src="images/icon/001_57.ico" alt="" title="" style="padding-left: 10px; padding-top: 12px; float: left;"/>
                    <h2>&nbsp;&nbsp;THÊM TÀI KHOẢN MỚI</h2>
                </div>
                <div class="con_bg_top"></div>
                <div class="col_bg">
                    <div class="col_grad_bot">
                        <div class="col_grad_top">
                            <br />
                            <div style="padding-left:10px">
                            <b style="color:Red">Lưu ý: </b>
                            <b style="color:Black">Tài khoản được tạo sau đây do thành viên đang đăng nhập quản lý</b>
                            </div>
                            <br />
                            <div style="text-align:center">
                                    <table>
                                        <tr>
                                            <td><b style="color:Black">Tên tài khoản  </b>
                                            </td>
                                            <td>
                                                <asp:TextBox id="tentk" runat="server" Width="279px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                                    ErrorMessage="*" ControlToValidate="tentk"></asp:RequiredFieldValidator>
                                            
                                                <asp:CustomValidator ID="CustomValidator1" runat="server" 
                                                    ErrorMessage="Tài khoản đã có người đăng kí" ControlToValidate="tentk" 
                                                    onservervalidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                                            </td>
                                        <tr>
                                            <td>
                                                <b style="color:Black">Password  </b>
                                            </td>
                                            <td>
                                                <asp:TextBox id="pass" TextMode="Password" runat="server" Width="279px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                                    ErrorMessage="*" ControlToValidate="pass"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        </tr>
                                        <tr>
                                            <td>
                                                <b style="color:Black">Lặp lại Password  </b>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="pass_re" TextMode="Password" runat="server" Width="279px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                                    ErrorMessage="*" ControlToValidate="pass_re"></asp:RequiredFieldValidator>
                                                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                                    ErrorMessage="Password không trùng" ControlToCompare="pass" 
                                                    ControlToValidate="pass_re"></asp:CompareValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <b style="color:Black">Vai trò </b>        
                                            </td>
                                            
                                            <td style="text-align:right">
                                                <asp:DropDownList ID="DropDownList1" runat="server" 
                                                    DataSourceID="SqlDataSource1" DataTextField="tenvaitro" 
                                                    DataValueField="mavaitro" Height="18px">
                                                </asp:DropDownList>
                                                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                                    ConnectionString="<%$ ConnectionStrings:forum %>" 
                                                    SelectCommand="select top 2 * from vaitro order by mavaitro desc">
                                                </asp:SqlDataSource>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" style="text-align:center">
                                                <asp:Button ID="btn_OK" runat="server" Text="Chấp nhận" onclick="btn_OK_Click" 
                                                    Width="90px" Height="28px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <br />
                                                <asp:Label ID="lb_error" runat="server" Text="" ForeColor="Red"></asp:Label>
                                                <asp:Label ID="lb_kq" runat="server" Text="" ForeColor="Blue"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                    </div>
                                 
                        </div>
                    </div>
                </div>
            </div>
            <div class="con_white_hr"></div>
            </div>  
</asp:Content>